
cc.Class({
    extends: cc.Component,

    properties: {
        setupWindow:{
            default:null,
            type:cc.Node,
        }
    },

    // LIFE-CYCLE CALLBACKS:

    // onLoad () {},

    start () {
        this.setupWindow.active =false
    },
    popOutSetupWindow(){
        this.setupWindow.active = true
        if(this.setupWindow.scaleX>0.5){
            this.closeWindow()
        }else{
            this.setupWindow.scaleX = 0
            this.setupWindow.scaleY = 0
            this.setupWindow.runAction(cc.scaleTo(0.25,1,1).easing(cc.easeBackOut()))
        }
        
    },
    closeWindow(){
        this.setupWindow.runAction(cc.sequence(cc.scaleTo(0.15,0,0).easing(cc.easeBackIn()),cc.callFunc((self)=>{
            //self.active = false
        },this.setupWindow)))
    },

    // update (dt) {},
});
